//---------------------------------------------------------------------------------
#ifndef __CSCENEWIDGET_H__
#define __CSCENEWIDGET_H__
//---------------------------------------------------------------------------------
#include <QWidget>
#include "CMap.h"
#include "CMario.h"
//---------------------------------------------------------------------------------
class CSceneWidget : public QWidget {
	Q_OBJECT
	public:
		CSceneWidget(QWidget* parent);
		void setMap(CMap* map) { this->map=map; reset(); }
		void nextStep(void) { if(++step == 12) step=0; }
		void reset(void);
protected:
		virtual void paintEvent(QPaintEvent* event);
		virtual void mouseReleaseEvent(QMouseEvent* event);
	private:
		CMap* map;
		CMario* mario;
		int step;
		int margeX;
		int margeY;
	signals:
		void restart(void);
		void win(void);
		void playerMove(QList<CMap::EAction> actions);
};
//---------------------------------------------------------------------------------
#endif //__CSCENEWIDGET_H__
//---------------------------------------------------------------------------------